# CMakeList for Boost projects
cmake_minimum_required(VERSION 2.8)
project(thread_hello)

# for headers
#set(BOOST_INCLUDE_DIRS 
#	/usr/local/boost_1_55_0/
#)

set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} 
			/usr/share/cmake-2.8/Modules
)

message("MODULE PATH is ${CMAKE_MODULE_PATH}")
message("ROOT is ${CMAKE_ROOT}")

# for headers and libraries found with CMake module
set(Boost_USE_STATIC_LIBS OFF) 
set(Boost_USE_MULTITHREADED ON)  
set(Boost_USE_STATIC_RUNTIME OFF) 

find_package(Boost 1.54.0 COMPONENTS thread system) # 1.54.0  1.55.0 

if(Boost_FOUND)
    include_directories(${Boost_INCLUDE_DIRS}) 
    add_executable(thread_hello main_thread_hello.cpp) 
    target_link_libraries(thread_hello ${Boost_LIBRARIES})                                                                                                                                                                                                                            
endif()
